package dao.implementations;

import dao.interfaces.EdgeDao;
import dao.interfaces.InstanceDao;
import dao.interfaces.NodeDao;
import dao.interfaces.UnitDao;

/**
 * This class creates the new data access objects.
 * @author Johnny
 */
public class DaoFactory {

    private NodeDaoMsSql nodeDao;
    private EdgeDaoMsSql edgeDao;
    private InstanceDaoMsSql instDao;
    private UnitDaoMsSql unitDao;

    public DaoFactory() {
        nodeDao = new NodeDaoMsSql();
        edgeDao = new EdgeDaoMsSql(nodeDao);
        instDao = new InstanceDaoMsSql();
        unitDao = new UnitDaoMsSql(instDao);
    }

    public EdgeDao getEdgeDao() {
        return edgeDao;
    }

    public InstanceDao getInstDao() {
        return instDao;
    }

    public NodeDao getNodeDao() {
        return nodeDao;
    }

    public UnitDao getUnitDao() {
        return unitDao;
    }
}
